Plot Data
library(ggplot2)
# raw data
ggplot(dataset, aes(x=Niraparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=FALSE, colour="#666666") +
geom_point(aes(colour=Treatment, shape=Experiment), size=2) +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)") +
scale_shape_manual(values=14:19) +
scale_color_manual(values=c("#999999","#0072B2","#CC79A7","#009E73"))

# Counts Linear
ggplot(dataset, aes(x=Niraparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ x, se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)")

# NormCounts Linear
ggplot(dataset, aes(x=Niraparib, y=NormCounts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ x, se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)")

# NormCounts2 Linear
ggplot(dataset, aes(x=Niraparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ x, se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)")

# Counts Quadratic
ggplot(dataset, aes(x=Niraparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)")

# NormCounts Quadratic
ggplot(dataset, aes(x=Niraparib, y=NormCounts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)")

# NormCounts2 Quadratic
ggplot(dataset, aes(x=Niraparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)")

# Counts Cubic
ggplot(dataset, aes(x=Niraparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)")

# NormCounts Cubic
ggplot(dataset, aes(x=Niraparib, y=NormCounts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)")

# NormCounts2 Cubic
ggplot(dataset, aes(x=Niraparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)")

library(Cairo)
cairo_pdf("FigureS1G_v1.pdf", width = 14, height = 4, family = "Arial")
ggplot(dataset, aes(x=Niraparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid.major=element_blank(), panel.grid.minor=element_blank(),
axis.line = element_line(colour = "black"), text = element_text(size=14),
panel.border = element_blank(), panel.background = element_blank()) +
geom_point(aes(colour = genotype)) +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, aes(colour = genotype), fill='#DDDDDD', size=0.5) +
facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)") +
ylab(label = "Normalized Counts") +
scale_color_manual(values=c('#000000','#800000','#000080','#808080'))
dev.off()
## quartz_off_screen
## 2
cairo_pdf("FigureS1G_v2.pdf", width = 6, height = 4, family = "Arial")
ggplot(dataset, aes(x=Niraparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid.major=element_blank(), panel.grid.minor=element_blank(),
axis.line = element_line(colour = "black"), text = element_text(size=14),
panel.border = element_blank(), panel.background = element_blank()) +
geom_point(aes(colour = genotype)) +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, aes(colour = genotype), fill='#DDDDDD', size=0.5) +
#facet_grid(. ~ genotype) +
xlab(label = "Niraparib (log10 nM)") +
ylab(label = "Normalized Counts") +
scale_color_manual(values=c('#000000','#800000','#000080','#808080'))
dev.off()
## quartz_off_screen
## 2
Models
library(MASS)
library(DHARMa)
library(lme4)
library(lmerTest)
library(bbmle)
Linear formula
fit1 <- lm(Counts ~ Experiment + Niraparib*genotype, data = dataset)
print(summary(fit1))
##
## Call:
## lm(formula = Counts ~ Experiment + Niraparib * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -333.07 -108.64 -7.35 94.55 406.75
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 775.35 80.94 9.580 3.06e-14 ***
## Experimentexp2 189.72 63.27 2.999 0.003786 **
## Experimentexp3 198.56 63.27 3.138 0.002512 **
## Experimentexp4 185.03 63.27 2.925 0.004683 **
## Experimentexp5 182.44 63.27 2.884 0.005261 **
## Niraparib -173.91 31.15 -5.584 4.47e-07 ***
## genotypePARP1KO -77.28 99.49 -0.777 0.440013
## genotypeALC1KO 69.91 99.49 0.703 0.484663
## genotypeALC1KO PARP1KO -111.40 99.49 -1.120 0.266803
## Niraparib:genotypePARP1KO 163.32 44.05 3.708 0.000422 ***
## Niraparib:genotypeALC1KO -87.80 44.05 -1.993 0.050253 .
## Niraparib:genotypeALC1KO PARP1KO 105.61 44.05 2.398 0.019258 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 179 on 68 degrees of freedom
## Multiple R-squared: 0.6958, Adjusted R-squared: 0.6465
## F-statistic: 14.14 on 11 and 68 DF, p-value: 1.172e-13
cat("AIC: ", AIC(fit1))
## AIC: 1069.966
simres <- simulateResiduals(fittedModel = fit1)
plot(simres)

fit2 <- lm(NormCounts ~ Niraparib*genotype, data = dataset)
print(summary(fit2))
##
## Call:
## lm(formula = NormCounts ~ Niraparib * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.52255 -0.13024 0.00821 0.11352 0.46329
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.52881 0.09432 16.209 < 2e-16 ***
## Niraparib -0.28463 0.04176 -6.816 2.41e-09 ***
## genotypePARP1KO -0.50200 0.13339 -3.763 0.000339 ***
## genotypeALC1KO 0.46584 0.13339 3.492 0.000822 ***
## genotypeALC1KO PARP1KO -0.32200 0.13339 -2.414 0.018321 *
## Niraparib:genotypePARP1KO 0.27021 0.05905 4.576 1.93e-05 ***
## Niraparib:genotypeALC1KO -0.25074 0.05905 -4.246 6.40e-05 ***
## Niraparib:genotypeALC1KO PARP1KO 0.17332 0.05905 2.935 0.004473 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2399 on 72 degrees of freedom
## Multiple R-squared: 0.7518, Adjusted R-squared: 0.7277
## F-statistic: 31.15 on 7 and 72 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit2))
## AIC: 8.204839
simres <- simulateResiduals(fittedModel = fit2)
plot(simres)

fit3 <- lm(NormCounts2 ~ Niraparib*genotype, data = dataset)
print(summary(fit3))
##
## Call:
## lm(formula = NormCounts2 ~ Niraparib * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.40635 -0.07229 0.00692 0.09547 0.36027
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.18883 0.06772 17.555 < 2e-16 ***
## Niraparib -0.22134 0.02998 -7.383 2.17e-10 ***
## genotypePARP1KO -0.16797 0.09577 -1.754 0.08371 .
## genotypeALC1KO -0.08887 0.09577 -0.928 0.35651
## genotypeALC1KO PARP1KO -0.11968 0.09577 -1.250 0.21546
## Niraparib:genotypePARP1KO 0.20699 0.04240 4.882 6.12e-06 ***
## Niraparib:genotypeALC1KO -0.07390 0.04240 -1.743 0.08562 .
## Niraparib:genotypeALC1KO PARP1KO 0.12272 0.04240 2.894 0.00502 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1723 on 72 degrees of freedom
## Multiple R-squared: 0.7654, Adjusted R-squared: 0.7426
## F-statistic: 33.55 on 7 and 72 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit3))
## AIC: -44.80283
simres <- simulateResiduals(fittedModel = fit3)
plot(simres)

fit4 <- lmer(Counts ~ Niraparib*genotype + (1|UID), data = dataset)
print(summary(fit4))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ Niraparib * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 979.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.16273 -0.53814 -0.09473 0.43116 2.24089
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 11807 108.7
## Residual 26129 161.6
## Number of obs: 80, groups: UID, 20
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 926.50 80.00 42.05 11.581 1.15e-14
## Niraparib -173.91 28.13 56.00 -6.182 7.69e-08
## genotypePARP1KO -77.28 113.14 42.05 -0.683 0.498309
## genotypeALC1KO 69.91 113.14 42.05 0.618 0.539949
## genotypeALC1KO PARP1KO -111.40 113.14 42.05 -0.985 0.330433
## Niraparib:genotypePARP1KO 163.32 39.79 56.00 4.105 0.000133
## Niraparib:genotypeALC1KO -87.80 39.79 56.00 -2.207 0.031459
## Niraparib:genotypeALC1KO PARP1KO 105.61 39.79 56.00 2.654 0.010329
##
## (Intercept) ***
## Niraparib ***
## genotypePARP1KO
## genotypeALC1KO
## genotypeALC1KO PARP1KO
## Niraparib:genotypePARP1KO ***
## Niraparib:genotypeALC1KO *
## Niraparib:genotypeALC1KO PARP1KO *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) Nirprb gPARP1 gALC1K gALC1P N:PARP N:ALC1
## Niraparib -0.653
## gntyPARP1KO -0.707 0.462
## gntypALC1KO -0.707 0.462 0.500
## gALC1KOPARP -0.707 0.462 0.500 0.500
## Nrp:PARP1KO 0.462 -0.707 -0.653 -0.327 -0.327
## Nrpr:ALC1KO 0.462 -0.707 -0.327 -0.653 -0.327 0.500
## N:ALC1KOPAR 0.462 -0.707 -0.327 -0.327 -0.653 0.500 0.500
cat("AIC: ", AIC(fit4))
## AIC: 999.1114
simres <- simulateResiduals(fittedModel = fit4)
plot(simres)

Quadratic formula
fit5 <- lm(Counts ~ Experiment + poly(Niraparib, 2)*genotype, data = dataset)
print(summary(fit5))
##
## Call:
## lm(formula = Counts ~ Experiment + poly(Niraparib, 2) * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -281.09 -73.08 -10.46 78.20 285.10
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 452.25 43.70 10.349 2.68e-15
## Experimentexp2 189.72 48.86 3.883 0.000247
## Experimentexp3 198.56 48.86 4.064 0.000134
## Experimentexp4 185.03 48.86 3.787 0.000339
## Experimentexp5 182.44 48.86 3.734 0.000403
## poly(Niraparib, 2)1 -1998.41 276.38 -7.231 7.31e-10
## poly(Niraparib, 2)2 -1649.24 276.38 -5.967 1.15e-07
## genotypePARP1KO 226.15 43.70 5.175 2.45e-06
## genotypeALC1KO -93.20 43.70 -2.133 0.036785
## genotypeALC1KO PARP1KO 84.80 43.70 1.941 0.056721
## poly(Niraparib, 2)1:genotypePARP1KO 1876.75 390.86 4.802 9.85e-06
## poly(Niraparib, 2)2:genotypePARP1KO 1483.15 390.86 3.795 0.000331
## poly(Niraparib, 2)1:genotypeALC1KO -1008.86 390.86 -2.581 0.012149
## poly(Niraparib, 2)2:genotypeALC1KO 731.76 390.86 1.872 0.065750
## poly(Niraparib, 2)1:genotypeALC1KO PARP1KO 1213.51 390.86 3.105 0.002836
## poly(Niraparib, 2)2:genotypeALC1KO PARP1KO 1167.20 390.86 2.986 0.003999
##
## (Intercept) ***
## Experimentexp2 ***
## Experimentexp3 ***
## Experimentexp4 ***
## Experimentexp5 ***
## poly(Niraparib, 2)1 ***
## poly(Niraparib, 2)2 ***
## genotypePARP1KO ***
## genotypeALC1KO *
## genotypeALC1KO PARP1KO .
## poly(Niraparib, 2)1:genotypePARP1KO ***
## poly(Niraparib, 2)2:genotypePARP1KO ***
## poly(Niraparib, 2)1:genotypeALC1KO *
## poly(Niraparib, 2)2:genotypeALC1KO .
## poly(Niraparib, 2)1:genotypeALC1KO PARP1KO **
## poly(Niraparib, 2)2:genotypeALC1KO PARP1KO **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 138.2 on 64 degrees of freedom
## Multiple R-squared: 0.8292, Adjusted R-squared: 0.7892
## F-statistic: 20.72 on 15 and 64 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit5))
## AIC: 1031.758
simres <- simulateResiduals(fittedModel = fit5)
plot(simres)

fit6 <- lm(NormCounts ~ poly(Niraparib, 2)*genotype, data = dataset)
print(summary(fit6))
##
## Call:
## lm(formula = NormCounts ~ poly(Niraparib, 2) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.41564 -0.05728 0.01725 0.07613 0.32558
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 1.000e+00 3.387e-02 29.528
## poly(Niraparib, 2)1 -3.271e+00 3.029e-01 -10.798
## poly(Niraparib, 2)2 -2.711e+00 3.029e-01 -8.950
## genotypePARP1KO 8.887e-16 4.789e-02 0.000
## genotypeALC1KO 6.802e-16 4.789e-02 0.000
## genotypeALC1KO PARP1KO 8.668e-16 4.789e-02 0.000
## poly(Niraparib, 2)1:genotypePARP1KO 3.105e+00 4.284e-01 7.248
## poly(Niraparib, 2)2:genotypePARP1KO 2.492e+00 4.284e-01 5.818
## poly(Niraparib, 2)1:genotypeALC1KO -2.881e+00 4.284e-01 -6.726
## poly(Niraparib, 2)2:genotypeALC1KO 1.198e+00 4.284e-01 2.797
## poly(Niraparib, 2)1:genotypeALC1KO PARP1KO 1.992e+00 4.284e-01 4.649
## poly(Niraparib, 2)2:genotypeALC1KO PARP1KO 1.904e+00 4.284e-01 4.444
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Niraparib, 2)1 < 2e-16 ***
## poly(Niraparib, 2)2 4.16e-13 ***
## genotypePARP1KO 1.0000
## genotypeALC1KO 1.0000
## genotypeALC1KO PARP1KO 1.0000
## poly(Niraparib, 2)1:genotypePARP1KO 5.06e-10 ***
## poly(Niraparib, 2)2:genotypePARP1KO 1.77e-07 ***
## poly(Niraparib, 2)1:genotypeALC1KO 4.41e-09 ***
## poly(Niraparib, 2)2:genotypeALC1KO 0.0067 **
## poly(Niraparib, 2)1:genotypeALC1KO PARP1KO 1.58e-05 ***
## poly(Niraparib, 2)2:genotypeALC1KO PARP1KO 3.34e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1515 on 68 degrees of freedom
## Multiple R-squared: 0.9066, Adjusted R-squared: 0.8915
## F-statistic: 59.99 on 11 and 68 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit6))
## AIC: -61.96441
simres <- simulateResiduals(fittedModel = fit6)
plot(simres)

fit7 <- lm(NormCounts2 ~ poly(Niraparib, 2)*genotype, data = dataset)
print(summary(fit7))
##
## Call:
## lm(formula = NormCounts2 ~ poly(Niraparib, 2) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.27959 -0.05075 0.01715 0.06445 0.17954
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.77762 0.02288 33.994 < 2e-16
## poly(Niraparib, 2)1 -2.54339 0.20460 -12.431 < 2e-16
## poly(Niraparib, 2)2 -2.10815 0.20460 -10.304 1.59e-15
## genotypePARP1KO 0.21659 0.03235 6.695 5.00e-09
## genotypeALC1KO -0.22617 0.03235 -6.991 1.47e-09
## genotypeALC1KO PARP1KO 0.10831 0.03235 3.348 0.00133
## poly(Niraparib, 2)1:genotypePARP1KO 2.37854 0.28935 8.220 8.73e-12
## poly(Niraparib, 2)2:genotypePARP1KO 1.89063 0.28935 6.534 9.70e-09
## poly(Niraparib, 2)1:genotypeALC1KO -0.84916 0.28935 -2.935 0.00455
## poly(Niraparib, 2)2:genotypeALC1KO 1.27394 0.28935 4.403 3.87e-05
## poly(Niraparib, 2)1:genotypeALC1KO PARP1KO 1.41019 0.28935 4.874 6.88e-06
## poly(Niraparib, 2)2:genotypeALC1KO PARP1KO 1.39304 0.28935 4.814 8.59e-06
##
## (Intercept) ***
## poly(Niraparib, 2)1 ***
## poly(Niraparib, 2)2 ***
## genotypePARP1KO ***
## genotypeALC1KO ***
## genotypeALC1KO PARP1KO **
## poly(Niraparib, 2)1:genotypePARP1KO ***
## poly(Niraparib, 2)2:genotypePARP1KO ***
## poly(Niraparib, 2)1:genotypeALC1KO **
## poly(Niraparib, 2)2:genotypeALC1KO ***
## poly(Niraparib, 2)1:genotypeALC1KO PARP1KO ***
## poly(Niraparib, 2)2:genotypeALC1KO PARP1KO ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1023 on 68 degrees of freedom
## Multiple R-squared: 0.9218, Adjusted R-squared: 0.9092
## F-statistic: 72.92 on 11 and 68 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit7))
## AIC: -124.7442
simres <- simulateResiduals(fittedModel = fit7)
plot(simres)

fit8 <- lmer(Counts ~ poly(Niraparib, 2)*genotype + (1|UID), data = dataset)
print(summary(fit8))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(Niraparib, 2) * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 850.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.12477 -0.47088 -0.01049 0.55348 2.11212
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 15898 126.09
## Residual 9765 98.82
## Number of obs: 80, groups: UID, 20
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 603.40 60.56 16.00 9.963
## poly(Niraparib, 2)1 -1998.41 197.64 52.00 -10.112
## poly(Niraparib, 2)2 -1649.24 197.64 52.00 -8.345
## genotypePARP1KO 226.15 85.65 16.00 2.640
## genotypeALC1KO -93.20 85.65 16.00 -1.088
## genotypeALC1KO PARP1KO 84.80 85.65 16.00 0.990
## poly(Niraparib, 2)1:genotypePARP1KO 1876.75 279.50 52.00 6.715
## poly(Niraparib, 2)2:genotypePARP1KO 1483.15 279.50 52.00 5.306
## poly(Niraparib, 2)1:genotypeALC1KO -1008.86 279.50 52.00 -3.609
## poly(Niraparib, 2)2:genotypeALC1KO 731.76 279.50 52.00 2.618
## poly(Niraparib, 2)1:genotypeALC1KO PARP1KO 1213.51 279.50 52.00 4.342
## poly(Niraparib, 2)2:genotypeALC1KO PARP1KO 1167.20 279.50 52.00 4.176
## Pr(>|t|)
## (Intercept) 2.89e-08 ***
## poly(Niraparib, 2)1 7.08e-14 ***
## poly(Niraparib, 2)2 3.64e-11 ***
## genotypePARP1KO 0.017813 *
## genotypeALC1KO 0.292640
## genotypeALC1KO PARP1KO 0.336865
## poly(Niraparib, 2)1:genotypePARP1KO 1.41e-08 ***
## poly(Niraparib, 2)2:genotypePARP1KO 2.34e-06 ***
## poly(Niraparib, 2)1:genotypeALC1KO 0.000690 ***
## poly(Niraparib, 2)2:genotypeALC1KO 0.011556 *
## poly(Niraparib, 2)1:genotypeALC1KO PARP1KO 6.56e-05 ***
## poly(Niraparib, 2)2:genotypeALC1KO PARP1KO 0.000113 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) pl(N,2)1 pl(N,2)2 gPARP1 gALC1K gALC1P p(N,2)1:P p(N,2)2:P
## ply(Nrp,2)1 0.000
## ply(Nrp,2)2 0.000 0.000
## gntyPARP1KO -0.707 0.000 0.000
## gntypALC1KO -0.707 0.000 0.000 0.500
## gALC1KOPARP -0.707 0.000 0.000 0.500 0.500
## p(N,2)1:PAR 0.000 -0.707 0.000 0.000 0.000 0.000
## p(N,2)2:PAR 0.000 0.000 -0.707 0.000 0.000 0.000 0.000
## p(N,2)1:ALC 0.000 -0.707 0.000 0.000 0.000 0.000 0.500 0.000
## p(N,2)2:ALC 0.000 0.000 -0.707 0.000 0.000 0.000 0.000 0.500
## p(N,2)1:ALP 0.000 -0.707 0.000 0.000 0.000 0.000 0.500 0.000
## p(N,2)2:ALP 0.000 0.000 -0.707 0.000 0.000 0.000 0.000 0.500
## p(N,2)1:A p(N,2)2:A p(N,2)1P
## ply(Nrp,2)1
## ply(Nrp,2)2
## gntyPARP1KO
## gntypALC1KO
## gALC1KOPARP
## p(N,2)1:PAR
## p(N,2)2:PAR
## p(N,2)1:ALC
## p(N,2)2:ALC 0.000
## p(N,2)1:ALP 0.500 0.000
## p(N,2)2:ALP 0.000 0.500 0.000
cat("AIC: ", AIC(fit8))
## AIC: 878.8193
simres <- simulateResiduals(fittedModel = fit8)
plot(simres)

Cubic formula
fit9 <- lm(Counts ~ Experiment + poly(Niraparib, 3)*genotype, data = dataset)
print(summary(fit9))
##
## Call:
## lm(formula = Counts ~ Experiment + poly(Niraparib, 3) * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -226.450 -71.789 -9.669 82.842 247.150
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 452.25 42.33 10.685 1.64e-15
## Experimentexp2 189.72 47.32 4.009 0.000171
## Experimentexp3 198.56 47.32 4.196 9.11e-05
## Experimentexp4 185.03 47.32 3.910 0.000238
## Experimentexp5 182.44 47.32 3.855 0.000284
## poly(Niraparib, 3)1 -1998.41 267.70 -7.465 4.02e-10
## poly(Niraparib, 3)2 -1649.24 267.70 -6.161 6.61e-08
## poly(Niraparib, 3)3 -635.60 267.70 -2.374 0.020798
## genotypePARP1KO 226.15 42.33 5.343 1.49e-06
## genotypeALC1KO -93.20 42.33 -2.202 0.031527
## genotypeALC1KO PARP1KO 84.80 42.33 2.003 0.049650
## poly(Niraparib, 3)1:genotypePARP1KO 1876.75 378.58 4.957 6.18e-06
## poly(Niraparib, 3)2:genotypePARP1KO 1483.15 378.58 3.918 0.000232
## poly(Niraparib, 3)3:genotypePARP1KO 623.91 378.58 1.648 0.104578
## poly(Niraparib, 3)1:genotypeALC1KO -1008.86 378.58 -2.665 0.009880
## poly(Niraparib, 3)2:genotypeALC1KO 731.76 378.58 1.933 0.057972
## poly(Niraparib, 3)3:genotypeALC1KO 1059.16 378.58 2.798 0.006908
## poly(Niraparib, 3)1:genotypeALC1KO PARP1KO 1213.51 378.58 3.205 0.002162
## poly(Niraparib, 3)2:genotypeALC1KO PARP1KO 1167.20 378.58 3.083 0.003094
## poly(Niraparib, 3)3:genotypeALC1KO PARP1KO 562.54 378.58 1.486 0.142541
##
## (Intercept) ***
## Experimentexp2 ***
## Experimentexp3 ***
## Experimentexp4 ***
## Experimentexp5 ***
## poly(Niraparib, 3)1 ***
## poly(Niraparib, 3)2 ***
## poly(Niraparib, 3)3 *
## genotypePARP1KO ***
## genotypeALC1KO *
## genotypeALC1KO PARP1KO *
## poly(Niraparib, 3)1:genotypePARP1KO ***
## poly(Niraparib, 3)2:genotypePARP1KO ***
## poly(Niraparib, 3)3:genotypePARP1KO
## poly(Niraparib, 3)1:genotypeALC1KO **
## poly(Niraparib, 3)2:genotypeALC1KO .
## poly(Niraparib, 3)3:genotypeALC1KO **
## poly(Niraparib, 3)1:genotypeALC1KO PARP1KO **
## poly(Niraparib, 3)2:genotypeALC1KO PARP1KO **
## poly(Niraparib, 3)3:genotypeALC1KO PARP1KO
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 133.8 on 60 degrees of freedom
## Multiple R-squared: 0.8498, Adjusted R-squared: 0.8023
## F-statistic: 17.87 on 19 and 60 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit9))
## AIC: 1029.49
simres <- simulateResiduals(fittedModel = fit9)
plot(simres)

fit10 <- lm(NormCounts ~ poly(Niraparib, 3)*genotype, data = dataset)
print(summary(fit10))
##
## Call:
## lm(formula = NormCounts ~ poly(Niraparib, 3) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.33865 -0.04709 0.00190 0.05132 0.35298
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 1.000e+00 2.936e-02 34.055
## poly(Niraparib, 3)1 -3.271e+00 2.626e-01 -12.453
## poly(Niraparib, 3)2 -2.711e+00 2.626e-01 -10.322
## poly(Niraparib, 3)3 -1.033e+00 2.626e-01 -3.933
## genotypePARP1KO 1.610e-15 4.153e-02 0.000
## genotypeALC1KO 9.364e-16 4.153e-02 0.000
## genotypeALC1KO PARP1KO 1.237e-15 4.153e-02 0.000
## poly(Niraparib, 3)1:genotypePARP1KO 3.105e+00 3.714e-01 8.359
## poly(Niraparib, 3)2:genotypePARP1KO 2.492e+00 3.714e-01 6.710
## poly(Niraparib, 3)3:genotypePARP1KO 9.932e-01 3.714e-01 2.674
## poly(Niraparib, 3)1:genotypeALC1KO -2.881e+00 3.714e-01 -7.757
## poly(Niraparib, 3)2:genotypeALC1KO 1.198e+00 3.714e-01 3.226
## poly(Niraparib, 3)3:genotypeALC1KO 1.893e+00 3.714e-01 5.097
## poly(Niraparib, 3)1:genotypeALC1KO PARP1KO 1.992e+00 3.714e-01 5.362
## poly(Niraparib, 3)2:genotypeALC1KO PARP1KO 1.904e+00 3.714e-01 5.126
## poly(Niraparib, 3)3:genotypeALC1KO PARP1KO 9.060e-01 3.714e-01 2.439
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Niraparib, 3)1 < 2e-16 ***
## poly(Niraparib, 3)2 2.98e-15 ***
## poly(Niraparib, 3)3 0.000209 ***
## genotypePARP1KO 1.000000
## genotypeALC1KO 1.000000
## genotypeALC1KO PARP1KO 1.000000
## poly(Niraparib, 3)1:genotypePARP1KO 7.51e-12 ***
## poly(Niraparib, 3)2:genotypePARP1KO 5.99e-09 ***
## poly(Niraparib, 3)3:genotypePARP1KO 0.009503 **
## poly(Niraparib, 3)1:genotypeALC1KO 8.64e-11 ***
## poly(Niraparib, 3)2:genotypeALC1KO 0.001978 **
## poly(Niraparib, 3)3:genotypeALC1KO 3.29e-06 ***
## poly(Niraparib, 3)1:genotypeALC1KO PARP1KO 1.21e-06 ***
## poly(Niraparib, 3)2:genotypeALC1KO PARP1KO 2.95e-06 ***
## poly(Niraparib, 3)3:genotypeALC1KO PARP1KO 0.017500 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1313 on 64 degrees of freedom
## Multiple R-squared: 0.9339, Adjusted R-squared: 0.9184
## F-statistic: 60.28 on 15 and 64 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit10))
## AIC: -81.64107
simres <- simulateResiduals(fittedModel = fit10)
plot(simres)

fit11 <- lm(NormCounts2 ~ poly(Niraparib, 3)*genotype, data = dataset)
print(summary(fit11))
##
## Call:
## lm(formula = NormCounts2 ~ poly(Niraparib, 3) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.273031 -0.038403 0.001626 0.043071 0.194653
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.77762 0.01958 39.723 < 2e-16
## poly(Niraparib, 3)1 -2.54339 0.17509 -14.526 < 2e-16
## poly(Niraparib, 3)2 -2.10815 0.17509 -12.040 < 2e-16
## poly(Niraparib, 3)3 -0.80328 0.17509 -4.588 2.14e-05
## genotypePARP1KO 0.21659 0.02768 7.823 6.61e-11
## genotypeALC1KO -0.22617 0.02768 -8.169 1.62e-11
## genotypeALC1KO PARP1KO 0.10831 0.02768 3.912 0.000224
## poly(Niraparib, 3)1:genotypePARP1KO 2.37854 0.24762 9.606 5.03e-14
## poly(Niraparib, 3)2:genotypePARP1KO 1.89063 0.24762 7.635 1.42e-10
## poly(Niraparib, 3)3:genotypePARP1KO 0.76369 0.24762 3.084 0.003013
## poly(Niraparib, 3)1:genotypeALC1KO -0.84916 0.24762 -3.429 0.001064
## poly(Niraparib, 3)2:genotypeALC1KO 1.27394 0.24762 5.145 2.75e-06
## poly(Niraparib, 3)3:genotypeALC1KO 1.27766 0.24762 5.160 2.60e-06
## poly(Niraparib, 3)1:genotypeALC1KO PARP1KO 1.41019 0.24762 5.695 3.34e-07
## poly(Niraparib, 3)2:genotypeALC1KO PARP1KO 1.39304 0.24762 5.626 4.38e-07
## poly(Niraparib, 3)3:genotypeALC1KO PARP1KO 0.69078 0.24762 2.790 0.006943
##
## (Intercept) ***
## poly(Niraparib, 3)1 ***
## poly(Niraparib, 3)2 ***
## poly(Niraparib, 3)3 ***
## genotypePARP1KO ***
## genotypeALC1KO ***
## genotypeALC1KO PARP1KO ***
## poly(Niraparib, 3)1:genotypePARP1KO ***
## poly(Niraparib, 3)2:genotypePARP1KO ***
## poly(Niraparib, 3)3:genotypePARP1KO **
## poly(Niraparib, 3)1:genotypeALC1KO **
## poly(Niraparib, 3)2:genotypeALC1KO ***
## poly(Niraparib, 3)3:genotypeALC1KO ***
## poly(Niraparib, 3)1:genotypeALC1KO PARP1KO ***
## poly(Niraparib, 3)2:genotypeALC1KO PARP1KO ***
## poly(Niraparib, 3)3:genotypeALC1KO PARP1KO **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08755 on 64 degrees of freedom
## Multiple R-squared: 0.9461, Adjusted R-squared: 0.9335
## F-statistic: 74.94 on 15 and 64 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit11))
## AIC: -146.5131
simres <- simulateResiduals(fittedModel = fit11)
plot(simres)

fit12 <- lmer(Counts ~ poly(Niraparib, 3)*genotype + (1|UID), data = dataset)
print(summary(fit12))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(Niraparib, 3) * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 784.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.54356 -0.39382 -0.04075 0.46432 1.79468
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 16461 128.30
## Residual 7512 86.67
## Number of obs: 80, groups: UID, 20
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 603.40 60.56 16.00 9.963
## poly(Niraparib, 3)1 -1998.41 173.34 48.00 -11.529
## poly(Niraparib, 3)2 -1649.24 173.34 48.00 -9.514
## poly(Niraparib, 3)3 -635.60 173.34 48.00 -3.667
## genotypePARP1KO 226.15 85.65 16.00 2.640
## genotypeALC1KO -93.20 85.65 16.00 -1.088
## genotypeALC1KO PARP1KO 84.80 85.65 16.00 0.990
## poly(Niraparib, 3)1:genotypePARP1KO 1876.75 245.14 48.00 7.656
## poly(Niraparib, 3)2:genotypePARP1KO 1483.15 245.14 48.00 6.050
## poly(Niraparib, 3)3:genotypePARP1KO 623.91 245.14 48.00 2.545
## poly(Niraparib, 3)1:genotypeALC1KO -1008.86 245.14 48.00 -4.115
## poly(Niraparib, 3)2:genotypeALC1KO 731.76 245.14 48.00 2.985
## poly(Niraparib, 3)3:genotypeALC1KO 1059.16 245.14 48.00 4.321
## poly(Niraparib, 3)1:genotypeALC1KO PARP1KO 1213.51 245.14 48.00 4.950
## poly(Niraparib, 3)2:genotypeALC1KO PARP1KO 1167.20 245.14 48.00 4.761
## poly(Niraparib, 3)3:genotypeALC1KO PARP1KO 562.54 245.14 48.00 2.295
## Pr(>|t|)
## (Intercept) 2.89e-08 ***
## poly(Niraparib, 3)1 1.97e-15 ***
## poly(Niraparib, 3)2 1.26e-12 ***
## poly(Niraparib, 3)3 0.000614 ***
## genotypePARP1KO 0.017813 *
## genotypeALC1KO 0.292640
## genotypeALC1KO PARP1KO 0.336865
## poly(Niraparib, 3)1:genotypePARP1KO 7.32e-10 ***
## poly(Niraparib, 3)2:genotypePARP1KO 2.10e-07 ***
## poly(Niraparib, 3)3:genotypePARP1KO 0.014194 *
## poly(Niraparib, 3)1:genotypeALC1KO 0.000151 ***
## poly(Niraparib, 3)2:genotypeALC1KO 0.004451 **
## poly(Niraparib, 3)3:genotypeALC1KO 7.78e-05 ***
## poly(Niraparib, 3)1:genotypeALC1KO PARP1KO 9.55e-06 ***
## poly(Niraparib, 3)2:genotypeALC1KO PARP1KO 1.81e-05 ***
## poly(Niraparib, 3)3:genotypeALC1KO PARP1KO 0.026164 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cat("AIC: ", AIC(fit12))
## AIC: 820.5844
simres <- simulateResiduals(fittedModel = fit12)
plot(simres)

Final Result
fit <- fit11
output <- coef(summary(fit))
output <- output[grep("Niraparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
# suggested result table
kable(output, row.names = T)
| Niraparib1 in WT |
-2.5433912 |
0.1750950 |
-14.525780 |
0.0000000 |
| Niraparib2 in WT |
-2.1081472 |
0.1750950 |
-12.040020 |
0.0000000 |
| Niraparib3 in WT |
-0.8032833 |
0.1750950 |
-4.587700 |
0.0000214 |
| Niraparib1: WT vs. PARP1KO |
2.3785388 |
0.2476217 |
9.605534 |
0.0000000 |
| Niraparib2: WT vs. PARP1KO |
1.8906339 |
0.2476217 |
7.635170 |
0.0000000 |
| Niraparib3: WT vs. PARP1KO |
0.7636918 |
0.2476217 |
3.084107 |
0.0030127 |
| Niraparib1: WT vs. ALC1KO |
-0.8491589 |
0.2476217 |
-3.429259 |
0.0010638 |
| Niraparib2: WT vs. ALC1KO |
1.2739376 |
0.2476217 |
5.144693 |
0.0000027 |
| Niraparib3: WT vs. ALC1KO |
1.2776559 |
0.2476217 |
5.159709 |
0.0000026 |
| Niraparib1: WT vs. ALC1KO PARP1KO |
1.4101940 |
0.2476217 |
5.694953 |
0.0000003 |
| Niraparib2: WT vs. ALC1KO PARP1KO |
1.3930368 |
0.2476217 |
5.625665 |
0.0000004 |
| Niraparib3: WT vs. ALC1KO PARP1KO |
0.6907757 |
0.2476217 |
2.789641 |
0.0069435 |
write.table(output, file = "FigureS1G_Stats_Ref_WT.txt", quote = F, sep = "\t", row.names = T, col.names = NA)
# re-fit with ALC1KO reference
dataset$genotype <- relevel(dataset$genotype, ref = "ALC1KO")
fit <- lm(NormCounts2 ~ poly(Niraparib,3)*genotype, data = dataset)
output <- coef(summary(fit))
output <- output[grep("Niraparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
# suggested result table
kable(output, row.names = T)
| Niraparib1 in ALC1KO |
-3.3925501 |
0.1750950 |
-19.3754836 |
0.0000000 |
| Niraparib2 in ALC1KO |
-0.8342096 |
0.1750950 |
-4.7643259 |
0.0000113 |
| Niraparib3 in ALC1KO |
0.4743727 |
0.1750950 |
2.7092304 |
0.0086432 |
| Niraparib1: ALC1KO vs. WT |
0.8491589 |
0.2476217 |
3.4292586 |
0.0010638 |
| Niraparib2: ALC1KO vs. WT |
-1.2739376 |
0.2476217 |
-5.1446928 |
0.0000027 |
| Niraparib3: ALC1KO vs. WT |
-1.2776559 |
0.2476217 |
-5.1597089 |
0.0000026 |
| Niraparib1: ALC1KO vs. PARP1KO |
3.2276977 |
0.2476217 |
13.0347928 |
0.0000000 |
| Niraparib2: ALC1KO vs. PARP1KO |
0.6166963 |
0.2476217 |
2.4904776 |
0.0153633 |
| Niraparib3: ALC1KO vs. PARP1KO |
-0.5139641 |
0.2476217 |
-2.0756021 |
0.0419542 |
| Niraparib1: ALC1KO vs. ALC1KO PARP1KO |
2.2593529 |
0.2476217 |
9.1242119 |
0.0000000 |
| Niraparib2: ALC1KO vs. ALC1KO PARP1KO |
0.1190992 |
0.2476217 |
0.4809723 |
0.6321764 |
| Niraparib3: ALC1KO vs. ALC1KO PARP1KO |
-0.5868803 |
0.2476217 |
-2.3700679 |
0.0208099 |
write.table(output, file = "FigureS1G_Stats_Ref_ALC1KO.txt", quote = F, sep = "\t", row.names = T, col.names = NA)